<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class ShopsPayments extends Model
{
    protected $autoWriteTimestamp = 'datetime';
    
    // 设置当前模型对应的完整数据表名称
    protected $table = 'shop_payments';

    // 设置字段信息
    protected $schema = [
        'shop_id'               => 'integer',
        'channel_id'            => 'integer',
        'method_id'             => 'integer',
        'status'                => 'boolean',
        'appid'                 => 'string',
        'private_key'           => 'string',
        'public_key'            => 'string',
        'notify_url'            => 'string',
        'return_url'            => 'string',
        'settle_appid'          => 'string',
        'settle_secret'         => 'string',
        'settle_get_userInfo'   => 'boolean',
        'polling'               => 'boolean',
        'polling_code'          => 'string',
        'create_time'           => 'datetime'
    ];

    // 设置字段自动转换类型
    protected $type = [
        'create_time'       => 'datetime',
    ];
}
